<?php
/**
 * Created by PhpStorm.
 * User: ahao
 * Email: 827316006@qq.com
 * Date: 2019/12/2 20:23
 */

$process = new swoole_process(function (swoole_process $pro) {
    //执行命令 php xxxx.php
    $pro->exec("/usr/local/php/bin/php", [__DIR__.'/../server/http_server.php']);
}, false);
$pid = $process->start();
echo $pid . PHP_EOL;

swoole_process::wait();